/*
 * @Author: Clark
 * @Email: haixuanwoTxh@gmail.com
 * @Date: 2022-10-14 16:28:48
 * @LastEditors: Clark
 * @LastEditTime: 2022-10-15 10:50:00
 * @Description: file content
 */

#include "protocol_business.h"

shared_ptr<ProtocolEngine> ProtocolBusiness::protocolEngine = make_shared<ProtocolEngine>();

ProtocolBusiness::ProtocolBusiness()
{

}

bool ProtocolBusiness::init_protocol_business()
{

    parsePacket = make_shared<std::thread>(parse_packet_thread);
    processMsg  = make_shared<std::thread>(process_message_thread);
    return true;
}

/**
 * @brief 解析协议包线程
 */
void ProtocolBusiness::parse_packet_thread(void)
{
    while (1)
    {
        log_debug("JH --- parse_packet_thread");
        sleep(2);
    }
}

/**
 * @brief 处理消息线程
 */
void ProtocolBusiness::process_message_thread(void)
{
    while (1)
    {
        log_debug("JH --- process_message_thread");
        sleep(2);
    }
}

ProtocolBusiness::~ProtocolBusiness()
{

}
